fix(docker): handle sigterm & sigint#31624
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Rolled these changes into a new docker image in the meantime since this pr is getting stale. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
opencode webissue oferror: Executable not found in $PATH: "xdg-open"Type of change
What does this PR do?
Currently running
docker run -it ghcr.io/anomalyco/opencode servenever always the process to be gracefully closed with SIGTERM and handles forever. This is because it runs as theENTRYPOINTon PID 1 with no process handler.Running with docker flag
--initdoes fix it but this is only for the docker runner and isn't cross platform (e.g. kubernetes).Instead we bake tini into the image which handles signal forwarding and child reaping.
How did you verify your code works?
Screenshots / recordings
nil
Checklist
If you do not follow this template your PR will be automatically rejected.